package org.xydpeng.framework.l2cache.message;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.xydpeng.framework.l2cache.enums.CacheOperation;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class CacheMessage implements Serializable {

    private long instanceId;

    private String cacheName;
    private Object key;
    private CacheOperation operation;

    public CacheMessage(String cacheName, Object key, CacheOperation operation) {
        this.cacheName = cacheName;
        this.operation = operation;
        this.key = key;
    }
}
